﻿using Inovout.Cloud.Data.Blob.Models;
using System.Threading.Tasks;

namespace Inovout.Cloud.Data.Blob.Service
{
    public interface IFileService
    {
        //bool Exists(string path);
        File Create(Directory container, string name, long length);

        Task<bool> UploadAsAsync(string key, System.IO.Stream fileStream);
        Task<bool> UploadAsAsync(File file, System.IO.Stream fileStream);
        //Task<bool> AppendUploadAsAsync(File file, System.IO.Stream fileStream);



        File FindByKey(string key);

        void Delete(File file);
        Task<System.IO.Stream> GetStreamAsync(File file, int offset, int length);
        Task<bool> CompleteUploadAsAsync(string key);
        Task<bool> CopyAsAsync(File sourcefile, File destinationFile);

        File FindByPath(string path);
        bool UploadLocalStream(string fileFullName, System.IO.Stream fileStream);
        System.IO.Stream GetLocalStream(File file);
    }
}
